---
title: Resolve or cache benefit-jurisdiction code table
summary: Loads and caches the benefit-jurisdiction code map, refreshing only when explicitly requested.
status: draft
owner: SAIF Claims BOF team
last_reviewed: 2026-08-21
library: SAIF.Business.Policy
reference_type: embedded
operation_id: OP-POL-010
trigger: Caller invokes CodeMaps.GetBenefitJurisdictionCodeMap
---

# Resolve or cache benefit-jurisdiction code table

Resolves and caches a single `clsBenefitJurisdictionCodeMap` instance, backed by `BENEFIT_JURISDICTION_CODE`, refreshing only when explicitly requested.

| Field | Value |
| --- | --- |
| **Operation ID** | OP-POL-010 |
| **Trigger** | Caller invokes `CodeMaps.GetBenefitJurisdictionCodeMap(inDPI, refresh)` |
| **Inputs** | Data portal info, `refresh` flag |
| **Outputs** | Cached `clsBenefitJurisdictionCodeMap` |
| **Primary components** | `CodeMaps.GetBenefitJurisdictionCodeMap`, `clsBenefitJurisdictionCodeMap` |
| **Entry point** | `SAIF.Business.Policy\CodeMaps\clsBenefitJurisdictionCodeMap.vb` |

## Steps

1. Caller invokes `CodeMaps.GetBenefitJurisdictionCodeMap(inDPI, refresh)`.
2. If not yet cached (or `refresh=True`), a new `clsBenefitJurisdictionCodeMap(inDPI, False)` is constructed.
3. The constructor issues `SELECT code, code_descr FROM BENEFIT_JURISDICTION_CODE` ([SQL-001](../sql/SQL-001-benefit-jurisdiction-code-lookup.md)) via the framework's `Fill(inDPI, sql)` helper, returning a `clsResultSet`.
   > **Origin**: The `Fill(inDPI, sql)` helper is implemented in `SAIF.Framework.Core` and executed on behalf of this operation.
4. Each row is mapped to a `BenefitJurisdictions` enum value (`S`→State, `F`→Federal) and added to the code map.
5. The single instance is cached in a `Static` local for subsequent calls until `refresh=True` is requested.

## Process flow

```mermaid
flowchart TD
	Start([GetBenefitJurisdictionCodeMap called]) --> D{Cached and not refresh?}
	D -->|Yes| EndCached([Return cached instance])
	D -->|No| S1[Construct clsBenefitJurisdictionCodeMap]
	S1 --> S2[Execute SQL-001 via Fill helper]
	S2 --> S3[Map rows to BenefitJurisdictions enum]
	S3 --> S4[Cache instance in Static local]
	S4 --> EndNew([Return new instance])
```

## Failure and edge-case behavior
- No error handling beyond the framework's own `Fill` helper behavior was observed.*

## Related documentation
- [Operations and processes](../operations-processes.md)
- [Business rules](../business-rules.md)
- [SQL catalog](../sql/index.md)
- [Database tables](../database-tables.md)

> **Note:** Statements marked with * were inferred from code structure, naming conventions, or
> contextual evidence where direct confirmation was not available in source artifacts.

## Sources
- `SAIF.Business.Policy\CodeMaps\clsBenefitJurisdictionCodeMap.vb`
